package com.boomsecret.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.boomsecret.domain.User;
import com.boomsecret.service.UserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author wangjinliang on 2019/1/25.
 */
@RestController
public class UserController {

    @Reference(version = "1.0.0")
    private UserService userService;

    @RequestMapping(value="/users")
    public List<User> getUsers() {
        return userService.getUsers();
    }
}
